using System.Data;

namespace XEAS.Framework.Data
{
    public interface iDataAccessLayer
    {
        bool AutoCloseConnection { get; set; }

        IDbConnection Connection { get; set; }

        string ConnectionString { get; set; }

        bool UseCommonConnection { get; set; }
        DataSet Execute(IDbCommand query, eExecutionType excutionType);
        DataSet Execute(string query, eExecutionType excutionType);
        DataSet Execute(string query, IDataParameter[] parameters, eExecutionType excutionType);
        DataSet Execute(string query, string[] parametersName, object[] values, eExecutionType excutionType);
        int ExecuteNonQuery(IDbCommand query, eExecutionType excutionType);
        int ExecuteNonQuery(string query, eExecutionType excutionType);
        int ExecuteNonQuery(string query, IDataParameter[] parameters, eExecutionType executionType);
        int ExecuteNonQuery(string query, string[] parametersName, object[] values, eExecutionType excutionType);
        IDataReader ExecuteReader(IDbCommand query, eExecutionType excutionType);
        IDataReader ExecuteReader(string query, eExecutionType excutionType);
        IDataReader ExecuteReader(IDbCommand query, CommandBehavior commandBehaviour, eExecutionType excutionType);
        IDataReader ExecuteReader(string query, CommandBehavior commandBehaviour, eExecutionType excutionType);
        IDataReader ExecuteReader(string query, IDataParameter[] parameters, eExecutionType excutionType);

        IDataReader ExecuteReader(string query, IDataParameter[] parameters, CommandBehavior commandBehaviour,
                                  eExecutionType excutionType);

        IDataReader ExecuteReader(string query, string[] parametersName, object[] values, eExecutionType excutionType);

        IDataReader ExecuteReader(string query, string[] parametersName, object[] values,
                                  CommandBehavior commandBehaviour, eExecutionType excutionType);

        object ExecuteScalar(IDbCommand query, eExecutionType excutionType);
        object ExecuteScalar(string query, eExecutionType excutionType);
        object ExecuteScalar(string query, IDataParameter[] parameters, eExecutionType excutionType);
        object ExecuteScalar(string query, string[] parametersName, object[] values, eExecutionType excutionType);
    }
}